<div class="content-section introduction ">
  <div>
    <span class="feature-title">巡检管理<span class="gt">&gt;</span>巡检报告  </span>
  </div>
</div>
<div class="content-section implementation GridDemo ">
  <div class="mysearch">
    <div class="ui-g">
      <div class="ui-g-5 ui-sm-12">
        <label class="ui-g-2 ui-sm-5 text-right" >计划名称:</label>
        <div class="ui-g-4  ui-sm-7 ui-fluid">
          <input pInputText type="text" name="sid" placeholder="计划名称" [(ngModel)]="queryModel.condition.name" />
        </div>
        <label class="ui-g-2 ui-sm-5 ui-no-padding-left-15px text-right">所属计划:</label>
        <div class="ui-g-4 ui-sm-7 ui-fluid  ui-no-padding-right-15px ">
          <input  pInputText type="text" name="status" placeholder="所属计划"  [(ngModel)]="queryModel.condition.inspection_plan_cid" />
        </div>
      </div>
      <div class="ui-g-4 ui-sm-12">
        <label class="ui-g-3 ui-sm-5 text-right">创建时间:</label>
        <div class="ui-g-4  ui-sm-7 ui-fluid">
          <p-calendar  [showIcon]="true" [locale]="zh" name="time_start"
                       [styleClass]="'schedule-add'" dateFormat="yy-mm-dd" [required]="true" dataType="string"
                       [minDate]="minDate" [(ngModel)]="queryModel.condition.create_date_start"  >
          </p-calendar>
        </div>
        <label class="ui-g-1 ui-sm-5 text-center" >至:</label>
        <div class="ui-g-4  ui-sm-7 ui-fluid ">
          <p-calendar  [showIcon]="true" [locale]="zh" name="end_time"
                       [styleClass]="'schedule-add'" dateFormat="yy-mm-dd" [required]="true" dataType="string"
                       [minDate]="minDate" [(ngModel)]="queryModel.condition.create_date_end" >
          </p-calendar>
        </div>
      </div>
      <div class="ui-g-3 ui-sm-12">
        <div class="ui-g-4 ui-sm-12 option">
          <button pButton type="button" label="查询" ngClass="ui-sm-12" (click)="suggestInsepectiones()" ></button>
        </div>
      </div>
    </div>
  </div>
  <div class="ui-g">
    <div class="ui-g-12">
      <p-dataTable [value]="inspections"
                   [totalRecords]="totalRecords"  [(selection)]="selectInsepections">
        <!--<p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>-->
        <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"></p-column>
        <p-column header="操作">
          <ng-template let-car="rowData" pTemplate="body" let-i="rowIndex">
            <button pButton type="button" label="下载" (click)="exportExcel(inspections[i])"></button>
          </ng-template>
        </p-column>
        <ng-template pTemplate="emptymessage">
          当前没有数据
        </ng-template>
      </p-dataTable>
      <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>
    </div>
  </div>
</div>
